package main

import "fmt"

type lan interface {
	sayhi()
}

type xu interface {
	lan
	sayhello()
}

type unit struct {
	name string
	id int
}

func (tmp *unit) sayhi() {
	fmt.Println("sayhi a =", *tmp)
}

func (tmp *unit) sayhello()  {
	fmt.Println("sayhello a =", *tmp)
}

func main()  {
	//声明一个接口类型的变量
	var i xu

	//初始化unit
	a := unit{"make", 222}


	i = &a
	i.sayhi()
	i.sayhello()
}
